1.0.25 • Published 6 years ago

@orientesh/frontend v1.0.25

Weekly downloads
-
License
MIT
Repository
-
Last release
6 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

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14-a

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago