public static void main(String[] args) {
		
		try(
				ServerSocket server = new ServerSocket(10_000);
				Socket clientsocket = server.accept();
					PrintWriter out = new PrintWriter(clientsocket.getOutputStream(), true);
					BufferedReader in = new BufferedReader(new InputStreamReader(clientsocket.getInputStream()));
					ObjectOutputStream oos = new ObjectOutputStream(clientsocket.getOutputStream())
				){
					String command = in.readLine();
					out.println(command);
				
				Pattern DELETE = Pattern.compile("(d\\()(\\d+)(\\))");
				Pattern UPDATE = Pattern.compile("");
				Pattern SEARCH = Pattern.compile("(findById\\()(\\d+)(\\))");
				
				Matcher delete_match = DELETE.matcher(command);
				Matcher update_match = UPDATE.matcher(command);
				Matcher search_match = SEARCH.matcher(command);
				
				if(delete_match.find()){
					long id = Long.parseLong(delete_match.group(2));
					AuctionService as = new InMemoryAuctionService();
					as.delete(id);
				}
				else if(update_match.find()){
					//find a way to update byte stream
//					AuctionService as = new InMemoryAuctionService();
//					as.update(id, a);
				}
				else if(search_match.find()){
					long id = Long.parseLong(search_match.group(2));
					AuctionService as = new InMemoryAuctionService();
				}
				try {
					clientsocket.close();
					oos.flush();
				}
					catch (IOException e) {
					e.printStackTrace();
				}
			} catch (IOException e1) {
				e1.printStackTrace();
			}
	}