dzitkowskik / mini-dos

Project for Distributed Operating Systems at Warsaw University of Technology (Mathematics and Computer Science department) Winter 2015
Apache License 2.0
0 stars 0 forks source link

Master - Creating Tables #36

Closed dzitkowskik closed 8 years ago

dzitkowskik commented 8 years ago

When node gets CREATE TABLE sql query then it should register table creation in master. Master should save sql of table creation as well its name. Node then executes create table query in his db as well as all nodes sent to him by master.

Secondly, when new node is registered in master, master sends him request to update his db with table creation and attaches a list of table names with sql queries to execute. Node check if it has table with that name in his db, and if it doesn't he executes that sql query (to create this table).

dzitkowskik commented 8 years ago

This create table in node should be implemented like inserts - using 2 phase commit, nearly the same code probably, but it must also send to master create sql to store it there for later

davidmigloz commented 8 years ago

Master registers the table name and create statement in its in-memory database.

Pending: when node registers in master send him all create tables.

davidmigloz commented 8 years ago

Master sends create tables staments to node when it registers. For doing that it uses a new method in MasterNodeInterface createTables() .

Pending: implement createTables() in node.

davidmigloz commented 8 years ago

Task ready.