2006年四月月 发布的文章

口语学习笔记之'享受闲暇时间'

继续学习’口语8000句’之’享受余暇时间’,下面是听写笔记!

[邀请友人]
Are you free this weekend?
Could I see you again?
Could you give me your phone number?
Where shall we meet?
Shall I come to pick you up?
Are you doing anything this afternoon?
How about having dinner with me?
Why don’t we go to see a baseball game?
Sorry, I’m tied up.
I’m afraid I can’t.
Thanks for asking, but…
How about a rain check?
I hope you can come.

[订计划]
When is it convenient for you?
About what time?
Whenever.
When you have time.
I’m free today.
I’ll be busy tomorrow.
How about the tenth?
When are you free?
That is a bad day for me.
That day is fine.
When can I come over?
You decide when/where.
Is seven convenient for you?
When can you come over?
Is it too early/late?
It is a date.
See you then.

[出门的时候]
Are you ready?
Ready!
I’m not ready.
What time shall we leave?
What time do we arrive?
Let’s get going.

[看电影]
Would you like to go to a movie?
What is on tonight?
What movie do you want to see?
I want to see…
Where is … playing?
How long is … playing?
Who is in this movie?
How long does it last?
What time is the next showing?
What time will it be over?
Two, please!
I can’t see because of the person in front of me.
We are way in the back, aren’t we?
Let’s sit closer up front.
That was interesting/boring, wasn’t it?
I was moved.

[听音乐会]
I like two tickets for October 3rd, please.
Sorry, we were sold out.
When do you have tickets?
What time does it start?
Can I make a reservation?
Where can I buy a ticket?
Is this seat taken?
We have great seats, don’t we?
Go for it!

[打高尔夫球]
I’d like to play golf.
Would you like to golf tomorrow?
Do you want to join me?
Are there any golf courses around here?
How much is it per person?
How much is it per day?
Are there any extra charge?
Can I rent the equipment?
Please make a reservation for golf.
I’d like to make golf reservation.
When would you like to play?
This Friday is possible.
There are four of us.
What time are we starting?

[一起去喝酒]
How about a drink?
I need a drink.
Would you like to have a drink after work?
Do you have any beer?
Two bottles of beer, please.
One whiskey with water, please.
What kind of snacks should we have?
Let’s forget about work and have some fun.
Cheers!
What are you drinking?
I like to go barhopping.
The first shape is the best.
Nothing beats this!
Would you like a refill?
Another beer, please.
This whiskey is strong.
How do you like sake?
It is strong.
I am drunk.
I feel a little tipsy.
I’m loaded.
Drink moderately!
I get drunk easily.
I drank too much.
I should have drank less. == I have drank too much.
I have a hangover.

[唱卡拉OK]
Let’s go to karaoke.
What is karaoke?
Singing along with recorded music.
Are you good at singing?
I’d like to request a song.
You sing first.
Let’s enjoy ourselves.
How about a song, John?
What are you going to sing?
Let’s sing a duet.
Now it is my turn.
I don’t have the nerve to sing in front of people.
I can’t keep up with the new songs.
I am tone-deaf.
What is your karaoke specialty?
I’ve never heard of that song.
You are a good singer.

[New Words To Me]
rain check — a promise that an unaccepted offer will be renewed in the future. (如果以后方便的时间或者下次还有机会,邀请继续有效)
get going — 出发
barhop — to patronize a series of bars during an evening.
refill — to fill again.
sake — a Japanese alcoholic beverage, brewed from rice. pronounced "SAH-KEH" in Japanese, but often "SAH-ki" by English speakers.
tipsy — slightly intoxicated.
loaded — very drunk.
duet — a composition for two voices or instruments.
tone-deaf — unable to appreciate music.

遇到系统的高可用性问题

我也是直到最近才接触到'高可用性'这个词儿的,从我所在的项目需求角度出发,我理解'高可用性'就是在系统的外部依赖实体(如主数据库、主网络)等瘫痪了之后,系统仍然能正常的支撑业务的运行,当然系统自己宕掉了,那就没辙了^_^。高可用性设计实际上就是在系统自身完好的情况下如何考虑其外部实体的设计以保证系统能持续的运行支撑下去,起码从我现在正在做的项目的角度来说是可以这样理解的。

目前我们的系统的高可用性主要体现在对数据库的访问机制上。对于24×7小时运行的系统来说,数据库不可避免的需要采用一些容灾机制来保证数据的正确和不丢失或者是将损失减少到最低点。我们的系统采用双机热备的方式,一旦ACTIVE数据库宕掉,我们的系统就应该'自动'切换到STANDBY数据库上。这里就存在一个问题,到底如何切换,又如何在ACTIVE数据库恢复后,重新将数据库切换回到ACTIVE数据库呢?我个人从一开始就想这个切换过程应该对我们的系统保持透明,我们的系统能看到的只有一套用户名、密码和服务名并利用这套配置访问数据库,置于访问到哪一个数据库可由数据库那方来定,这样对于我们的系统来说实现起来会简单很多,但是我们的技术支持组给的答案却是做不到,需要我们的系统自己提供一套行之有效的数据库切换方案。经过研究我们提供这样一套办法:利用一个外部监视程序定时检测主数据库是否可用,这个状态检测程序一旦发现主数据库不可用,就通过一个简单内部通信协议发送一个消息包到我们的系统,我们的系统解析该消息包,做出相应的切换处理,并发送告警通知相关人员;当检测程序一旦发现主数据库可用了,发送另外一个消息包通知我们的系统数据库恢复了。我们的系统中有多个兄弟进程依赖数据库,每个进程都是单独与数据库建立session的,这样一旦需要切换数据库,我们这些可怜的进程就需要做同样的判断流程,可想而知代码中会存在多少的重复或相似的代码段,而且一旦流程修改我势必要修改多处,这样代码中的坏味道儿可就太浓了,势必应该进行重构,记得以前写过这么一篇'C语言也重构',关于C语言重构的一些事项可以到那篇文章中查询。

灵光一闪!突然想到在Java组有数据库连接池的概念,我们可否效仿一下呢,我们也做一个这样的'数据库Session池'或者是一组抽象了的数据库session管理接口,这样对session的管理就集中起来了!session的管理接口负责判断是否需要切换和重新连接数据库,而这些切换操作对那些依赖数据库的进程来说是透明的。这样每个进程在每处理一条消息的时候都去调用一次open_session这样的接口,然后利用打开的session进行数据库操作即可。而open_session这个接口的实现也许要分两种情况:
1、在未切换数据库的情况下,使用原来已经存在的session即可,这里浪费的仅仅是一次条件判断而已;
2、在切换数据库的情况下,重新建立一个连到新数据库的session即可。

感觉这个方案可行,晚些儿时候再认真考虑一下,拿出一套可行方案。其实这里还要考虑这样一种情况也是可能性极其微小的情况,那就是两个数据库都宕了,这时候要考虑高可用性的话,那就该提供一些在没有数据库情况下的默认处理机制或者策略了。

如发现本站页面被黑,比如:挂载广告、挖矿等恶意代码,请朋友们及时联系我。十分感谢! Go语言第一课 Go语言精进之路1 Go语言精进之路2 商务合作请联系bigwhite.cn AT aliyun.com

欢迎使用邮件订阅我的博客

输入邮箱订阅本站,只要有新文章发布,就会第一时间发送邮件通知你哦!

这里是 Tony Bai的个人Blog,欢迎访问、订阅和留言! 订阅Feed请点击上面图片

如果您觉得这里的文章对您有帮助,请扫描上方二维码进行捐赠 ,加油后的Tony Bai将会为您呈现更多精彩的文章,谢谢!

如果您希望通过微信捐赠,请用微信客户端扫描下方赞赏码:

如果您希望通过比特币或以太币捐赠,可以扫描下方二维码:

比特币:

以太币:

如果您喜欢通过微信浏览本站内容,可以扫描下方二维码,订阅本站官方微信订阅号“iamtonybai”;点击二维码,可直达本人官方微博主页^_^:
本站Powered by Digital Ocean VPS。
选择Digital Ocean VPS主机,即可获得10美元现金充值,可 免费使用两个月哟! 著名主机提供商Linode 10$优惠码:linode10,在 这里注册即可免费获 得。阿里云推荐码: 1WFZ0V立享9折!


View Tony Bai's profile on LinkedIn
DigitalOcean Referral Badge

文章

评论

  • 正在加载...

分类

标签

归档



View My Stats