1.0.25 • Published 5 years ago

@orientesh/frontend v1.0.25

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@orientesh/frontend

A frontend framework for bulb-projectWIP.

Table of Contents

Motivation

To get our hands dirty in server-side rendering, it's quite obvious we'd need a Node.js layer. Alas, adding an extra layer for server-side rendering simply brings more complexity to the whole system and more chores for deployment.

Design Goals

  • Bulb is uniform. By "uniform", we mean we'd want to free application developers from managing fragmented chores.

  • Bulb is extensible. Bulb is bult on top of Egg.js, which is plugable. In fact, any existing plugins work directly in Bulb.

  • Bulb is distributed. Any serious softwares are distributed. This is the only way to robustness.

  • Bulb is fast.

Implementation

Hence, we've built a frontend on top of eggjs to take care of some fragile tasks:

  • Transpilation & bundling.

  • Preserve transpiled assets:

    • Store server-side assets to remote distributed file system(in our case, seaweedfs)
    • Push static client-side assets to CDN(TODO)

These tasks are handled by bulb online and yes, the build step is performed online.

Nonetheless, duplications of above tasks occur when deploying more than a single bulb application. In order to resolve this problem, we've chosen Zookeeper for distributed synchronization:

  • Take the above tasks as a whole single mono task, let's say, pack, which succeeds when all sub tasks succeed. It doesn't matter if it's halfway done, since those emitted/synced files will either be obsoleted or overwritten.

  • Each bulb server will be likely to execute pack. But before it does, it first proposes pack to a Zookeeper server, if it is the chosen leader, then it starts packing; otherwise it becomes a follower and waits.

  • Emitted server-side assets are fetched on demand, by other followers.

When pack is done, every server is ready.

Webpack

TODO

SeaweedFS

TODO

CDN

TODO

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14-a

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago